<html>
<head>
<style>
.ex1 {margin:2cm 4cm 3cm 4cm}
</style>
</head>

<body>
<div>This is a div</div>
<div class="ex1">This is a div</div>
<div>This is a div</div>
</body>

</html>